package gdepot

class Bank {

    String code              // 银行代码
    String name              // 银行名称
    String description       // 描述
    double singleLimit       //单笔限额
    double dailyLimit        //日累计限额
    double monthlyLimit      //月累计限额
    String imageName

    Date createdDate = new Date()
    Date modifiedDate = new Date()

    static constraints =
            {
                code size: 4..10
                name size: 0..128, nullable: true, blank: true
                description size: 0..1024, nullable: true, blank: true
                singleLimit nullable:true
                dailyLimit nullable:true
                monthlyLimit nullable:true
                imageName nullable: true
            }

    def beforeUpdate(){
        modifiedDate = new Date()
    }

    String toString(){
        name
    }
}
